import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;

public class Demo10_4 {

	public static void main(String[] args) throws IOException {
		ServerSocket server=new ServerSocket(2000);
		Socket incoming=server.accept();
		BufferedReader in=new BufferedReader(new InputStreamReader(incoming.getInputStream()));
		PrintWriter out=new PrintWriter(incoming.getOutputStream(),true);
		in.close();
		out.close();
		incoming.close();
	}

}
